<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改</title>
<jsp:useBean id="testbean" scope="session" class="srt.Database" />
</head>
<body>
<%! int i=0;
String Tci_idno=null ;
%>
<% 
if(i==0) {
	Tci_idno =request.getParameter("Tci_idno");
%>
<form action="modify.jsp" method="get">
   <div id="main" class="03">
	<table border="0">
		<tr>
		<td ><br><div id="title">修改会员信息</div></td>
		</tr>		
		<tr>
		<td ><br><div id="会员姓名">会员姓名:</div></td>
		<td colspan="2"><br><input  type="text" name="Tci_name" value="" onfocus="this.value=''" /> </td>
		</tr>
		
		<tr>
		<td><br><div class="small"><input  type="radio" name="Tci_gender" value="1" />男</div>  </td>
		<td> </td>
		<td><br><div class="small"><input  type="radio" name="Tci_gender" value="0" />女</div> </td>
		</tr>

		<tr>
		<td colspan="3"><br>
		<div id="denglu" >
		<input type="submit"  id="Submit" value="提交"><br>
			
		</div></td>
		</tr>
		
	</table>
  </div>
</form>

<%
i=2;
}
else{
	String Tci_name=request.getParameter("Tci_name");
	String Tci_gender=request.getParameter("Tci_gender");
	String sql = "update TB_CustomersInfo set Tci_name='"+Tci_name+
			"',Tci_gender="+Tci_gender+" where Tci_idno='"+Tci_idno+"' ";
	System.out.println(sql);
	Boolean rs= testbean.exeSql(sql);
	if(rs)out.println("数据保存成功！ <a href='index.jsp'>点击返回首页</a> ");
	else out.println("数据保存失败！ <a href='index.jsp'>点击返回首页</a> ");
	i=0;
}
%>
</body>
</html>